package com.aspose.cells;

abstract class zf {
   protected Row a;

   zf(Row var1) {
      this.a = var1;
   }

   public abstract void a();

   public abstract Cell a(int var1);

   public abstract Cell b(int var1);

   public abstract Cell a(int var1, boolean var2, boolean var3);

   public abstract int b();

   public abstract void c(int var1);

   public int d(int var1) {
      int var2 = this.a.a.a(var1, this.b());
      if (var2 < 0) {
         this.c(-var2 - 1);
         return var2;
      } else {
         return var2;
      }
   }

   public boolean a(Cell var1, int var2, boolean var3, boolean var4) {
      int var5 = this.a.a.a(var2, var1.a);
      if (var5 < 0) {
         var5 = -var5 - 1;
         if (var3) {
            this.c(var5);
            return false;
         }

         if (var4) {
            this.a.d.n();
         }

         if (var2 > this.a.d.getMaxColumn()) {
            this.a.d.a((short)var2);
         }

         zfv var6 = var1.c;
         var6.a(var2);
         var5 = this.a.a.a(var5, var6);
         this.c(var5);
         var1.c = this.a.a.a(var5, var6, 7);
         var1.a = var5;
      } else {
         var1.a = var5;
         this.c(var5);
         var1.c = this.a.a.a(var5, var1.c, 7);
      }

      return true;
   }

   public Cell b(int var1, boolean var2, boolean var3) {
      int var4 = this.a.a.a(var1, this.b());
      if (var4 < 0) {
         var4 = -var4 - 1;
         if (var2) {
            this.c(var4);
            return null;
         } else {
            if (var3) {
               this.a.d.n();
            }

            if (var1 > this.a.d.getMaxColumn()) {
               this.a.d.a((short)var1);
            }

            zfv var5 = new zfv(var1);
            var4 = this.a.a.a(var4, var5);
            this.c(var4);
            return new Cell(this.a, var4);
         }
      } else {
         this.c(var4);
         return new Cell(this.a, var4);
      }
   }
}
